<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Violent Crime Rates by US State</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for USArrests"><tr><td>USArrests</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Violent Crime Rates by US State</h2>

<h3>Description</h3>

<p>This data set contains statistics, in arrests per 100,000 residents
for assault, murder, and rape in each of the 50 US states in 1973.
Also given is the percent of the population living in urban areas.
</p>


<h3>Usage</h3>

<pre>USArrests</pre>


<h3>Format</h3>

<p>A data frame with 50 observations on 4 variables.
</p>

<table summary="Rd table">
<tr>
 <td style="text-align: right;">
    [,1]  </td><td style="text-align: left;"> Murder    </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Murder arrests (per 100,000)</td>
</tr>
<tr>
 <td style="text-align: right;">
    [,2]  </td><td style="text-align: left;"> Assault   </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Assault arrests (per 100,000)</td>
</tr>
<tr>
 <td style="text-align: right;">
    [,3]  </td><td style="text-align: left;"> UrbanPop  </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Percent urban population</td>
</tr>
<tr>
 <td style="text-align: right;">
    [,4]  </td><td style="text-align: left;"> Rape      </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Rape arrests (per 100,000)
  </td>
</tr>

</table>



<h3>Note</h3>

<p><code>USArrests</code> contains the data as in McNeil's monograph.  For the
<code>UrbanPop</code> percentages, a review of the table (No. 21) in the
Statistical Abstracts 1975 reveals a transcription error for Maryland
(and that McNeil used the same &ldquo;round to even&rdquo; rule that <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s
<code>round()</code> uses), as found by Daniel S Coven (Arizona).
</p>
<p>See the example below on how to correct the error and improve accuracy
for the &lsquo;&lt;n&gt;.5&rsquo; percentages.
</p>


<h3>Source</h3>

<p>World Almanac and Book of facts 1975.  (Crime rates).
</p>
<p>Statistical Abstracts of the United States 1975, p.20, (Urban rates),
possibly available as
<a href="https://books.google.ch/books?id=zl9qAAAAMAAJ&amp;pg=PA20">https://books.google.ch/books?id=zl9qAAAAMAAJ&amp;pg=PA20</a>.
</p>


<h3>References</h3>

<p>McNeil, D. R. (1977)
<em>Interactive Data Analysis</em>.
New York: Wiley.
</p>


<h3>See Also</h3>

<p>The <code>state</code> data sets.</p>


<h3>Examples</h3>

<pre>
summary(USArrests)

require(graphics)
pairs(USArrests, panel = panel.smooth, main = "USArrests data")

## Difference between 'USArrests' and its correction
USArrests["Maryland", "UrbanPop"] # 67 -- the transcription error
UA.C &lt;- USArrests
UA.C["Maryland", "UrbanPop"] &lt;- 76.6

## also +/- 0.5 to restore the original  &lt;n&gt;.5  percentages
s5u &lt;- c("Colorado", "Florida", "Mississippi", "Wyoming")
s5d &lt;- c("Nebraska", "Pennsylvania")
UA.C[s5u, "UrbanPop"] &lt;- UA.C[s5u, "UrbanPop"] + 0.5
UA.C[s5d, "UrbanPop"] &lt;- UA.C[s5d, "UrbanPop"] - 0.5

## ==&gt; UA.C  is now a *C*orrected version of  USArrests
</pre>


</body></html>
